package cn.topcodes.tcsf.app.domain.api;

import cn.topcode.unicorn.utils.In;
import cn.topcodes.tcsf.admin.commons.domain.ValueRangeConstant.Gender;
import lombok.Data;
import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * Created by Unicorn on 2017/7/26.
 */
@Data
public class ReqModifyAccountInfo implements Serializable {

    @Length(min = 1, max = 20, message = "用户名长度为1~20个字符")
    private String username;

    @Length(min = 1, max = 20, message = "姓名长度为1~20个字符")
    private String realname;

    @In(values = {Gender.GENDER_UNKNOWN, Gender.GENDER_MALE, Gender.GENDER_FEMALE}, message = "性别取值不正确")
    private String gender;

    private String tel;

    @Email(message = "邮箱格式不正确")
    @Length(min = 0, max = 30, message = "邮箱最大长度30个字符")
    private String email;

}
